<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>旅游网后台管理登录页面</title>
</head>
<div th:insert="/common/common"></div>
<script type="text/javascript">
    // function login(){
    //     $.ajax({
    //         url : "/personcontroller/login",
    //         type : "post",
    //         dataType : "json",
    //         data : $("#loginForm").serialize(),
    //         async : true,
    //         success : function (user){
    //             if (user == 1){
    //                 toastr.success("登陆成功")
    //                 location.href="/personcontroller/totreeshow"
    //             }else if (user == 2){
    //                 toastr.error("账号或密码错误")
    //             }else if (user == 3){
    //                 toastr.error("用户已被冻结")
    //             }
    //         },
    //         error : function (user){
    //             toastr.error("网络挂掉了，请刷新");
    //         }
    //     })
    // }
</script>
<body>
    <div class="container-fluid" align="center">
        <br><br><br><br><br><br><br><br>
        <div class="panel panel-primary" style="width:400px">
            <div class="panel-heading">
                <h1>登录</h1>
            </div>
            <div class="panel-body">
                <form id="loginForm" action="/personcontroller/login" method="post">
                    <span style="color: #761c19" th:text="${messg}"></span>
                    <div class="form-group">
                        <label for="name">账号</label>
                        <input type="text" class="form-control" name="pname" id="name"
                               placeholder="请输入账号">
                        <div id="tips"></div>
                    </div>
                    <div class="form-group">
                        <label for="pwd">密码</label>
                        <input type="password" class="form-control" name="pwd" id="pwd">
                    </div>
                    <input type="submit" class="btn btn-success btn-lg" value="登录">
                </form>
            </div>

            <div class="panel-footer">
                <a href="#">忘记密码？</a>
                <a href="/usercontroller/toregister">注册</a>
            </div>
        </div>
    </div>
</body>
</html>